// src/store/titleSlice.ts
import { createSlice, PayloadAction } from "@reduxjs/toolkit";

const initialState: string = "React Admin";

const titleSlice = createSlice({
  name: "title",
  initialState,
  reducers: {
    setTitle(state, action: PayloadAction<string>) {
      return action.payload;
    },
  },
});

export const { setTitle } = titleSlice.actions;
export default titleSlice.reducer;
